layui.use(['form','jquery','layer'],function() {
    let form = layui.form,
        $ = layui.jquery,
        layer = layui.layer;

    $(".save_delay").click(function(){
        let user_form = layer.getChildFrame('body', index).find("#delay_loss");
        let data = {};
        //把数组转为JSON
        user_form.serializeArray().forEach(function(val){
            data[val.name] = val.value;
        });
        $.post('customer-loss/save-delay',data,function(info){
            layer.close(index);
            layer.msg(info.msg);
            tabInstance.reload();
        });
    });
})